<template>
  <el-select v-model="value" placeholder="请选择" :clearable="true">
    <el-option
      v-for="item in educationList"
      :key="item.id"
      :label="item.value"
      :value="item.id">
    </el-option>
  </el-select>
</template>

<script>


  import {fetchList} from "../../api/web/dictionary";

  export default {
    watch: {
      value() {
        this.$emit('childByValue', this.value)
      }
    },
    data() {
      return {
        value: '',
        educationList: []
      }
    },
    created() {
      fetchList('education').then(res => {
        this.educationList = res.data
      }).catch(err => {
        console.log(err)
      })
    }
  }
</script>

<style scoped>

</style>
